public class Solution2011 {
    public int finalValueAfterOperations(String[] operations) {
        int x=0;
        for (String operation : operations) {
            if (operation.contains("+")){
                x++;
            }else {
                x--;
            }
        }
        return x;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2011().finalValueAfterOperations(new String[]{"--X","X++","X++"}));
    }
}
